using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.Reputation.Services
{
    public static class StatusCodes
    {
        public const uint OK = 0x00000000; // everything OK
        public const uint MoreData = 0x00000001; // there are more pages to fetch in listing API
        public const uint NoMatch = 0x00001002; // given entry has no match
        public const uint NoUpdate = 0x00001004; // means object was there, but with earlier stamp
        public const uint RefreshAll = 0x00001008; // means listing detected deletion and returning all
        public const uint Error = 0x80000000; // internal error (SQL connection/timeout, out-of-memory, and etc)

        //
        // Client ID Token validation
        //
        public const uint TooManyRequests = 0x80000001; // Number of requests exceeds maximum value in web.config
        public const uint NullClientIdToken = 0x80000002; // Client ID Token is null
        public const uint NullCustomerGuid = 0x80000003; // Customer Guid is null
        public const uint NullDeploymentGuid = 0x80000004; // Deployment Guid is null
        public const uint NullClientGuid = 0x80000005; // Client ID Token is null
        public const uint NullCustomerVersion = 0x80000006; // Customer version is null or empty

        //
        // Lookup API validation
        //
        public const uint NullLookupRequest = 0x80000010; // Lookup Request is null or empty
        public const uint NullObjectGuid = 0x80000011; // LookupRequest Guid has no value and there are no SearchableFields
        public const uint NullSearchableMetadata = 0x80000013; // Null searchable field
        public const uint DuplicateSearchableMetadata = 0x80000014; // More than one searchable field with same name
        public const uint InvalidSearchableMetadataEncode = 0x80000016; // SearchableFields Metadata is not properly encoded
        //
        // Filter validation
        //
        public const uint DuplicateRequestedDataType = 0x80000030; // Same Data Type requested more than once in filter
        public const uint ZeroRequestedMetadata = 0x80000031; // Requested Metadata count is zero
        public const uint MetadataNotRequested = 0x80000032; // Requested metadata provided, but Metadata Type not requested
        public const uint ZeroRequestedCategory = 0x80000033; // Requested Category count is zero
        public const uint ReputationNotRequested = 0x80000034; // Requested Category provided, but Reputation Type not requested

        //
        // Overrides validation
        //
        public const uint InvalidOverrideStamp = 0x80000040; // Client override stamp is less than zero

        //
        // Object Type Specific validation
        //
        public const uint InvalidObjectType = 0x80001001; // Invalidate/none supported object type
        public const uint InvalidDataType = 0x80001002; // Invalidate requested data type in filter
        public const uint InvalidMetadataType = 0x80001003; // Invalidate requested metadata type in filter
        public const uint InvalidTypeForDataBlock = 0x80001004; // The DataBlock passed could not be cast to Byte[]
        public const uint InvalidSearchableMetadata = 0x80001005; // Invalid Searchable Metadata
        public const uint InvalidSearchableMetadataName = 0x80001006; // Invalidate searchable metadata name
        public const uint InconsistentObjectType = 0x80001007; // Object types in requests are not consistent
    }
}
